﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Workbench.Operations;

namespace Workbench.Presentation
{
    public class SentenceViewModel : ViewModelBase
    {
        private string currentSentence;
        public string CurrentSentence
        {
            get { return currentSentence; }
            set
            {
                currentSentence = value;
                RaisePropertyChanged();
            }
        }

        public void ShowSentence(WordViewModelBase wordViewModel)
        {
            if (wordViewModel != null)
            {
                CurrentSentence = LemmatizerOperations.GetSentence(wordViewModel.DataModel);
            }
            else
            {
                CurrentSentence = null;
            }
        }

        public void Unload()
        {
            CurrentSentence = null;
        }
    }
}
